﻿using System.Data;
using DataScripter.Scripting.Compare.DataTables.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DataScripter.UnitTests.Comparison.DataTables.Data
{
    [TestClass]
    public class WhenRowsAreTheSame
    {
        private readonly DataTableDataComparisonResult _comparisonResult;

        public WhenRowsAreTheSame()
        {
            DataTable table1 = DataTableFactory.CreateDataTable();
            DataTable table2 = DataTableFactory.CreateDataTable();

            DataTableDataComparer comparer = new DataTableDataComparer(table1, table2);
            _comparisonResult = comparer.Compare();
        }

        [TestMethod]
        public void ResultShouldBeOk()
        {
            Assert.IsTrue(_comparisonResult.AllRowsAreTheSame());
        }
    }
}
